from django.db import models


# Create your models here.
class Post(models.Model):
	title = models.CharField( blank=False, maxlength=60 )
	content = models.TextField( blank = False, maxlength=1000 )
	date = models.DateTimeField()
	
	def formatted_date(self):
		"""retourne la date au format 01/12/2007"""
		return self.date.strftime("%d/%m/%Y")
		
	def __str__(self):
		return self.title
		
	class Admin:
		pass
